package com.ep.thirdPlatformProject.system.config.common;

import cn.hutool.core.util.ReflectUtil;
import org.jetbrains.annotations.NotNull;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;


@Component
@ConfigurationPropertiesBinding
public class RejectedExecutionHandler implements Converter<String,java.util.concurrent.RejectedExecutionHandler>  {
    @Override
    public java.util.concurrent.RejectedExecutionHandler convert(@NotNull String source) {
        return ReflectUtil.newInstance(source);
    }

    @NotNull
    @Override
    public <U> Converter<String, U> andThen(@NotNull Converter<? super java.util.concurrent.RejectedExecutionHandler, ? extends U> after) {
        return Converter.super.andThen(after);
    }

}
